package com.hunray.rent.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.validation.constraints.NotNull;
@Entity
@Table(name="t_income")
public class Income implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private Integer id;
	
	private String no;
	
	private Double total;
	
	private Double remain;
	
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "tg_income")
	@TableGenerator(name = "tg_income", table = "t_id", pkColumnName = "f_table", pkColumnValue = "t_income", valueColumnName = "f_id", allocationSize = 1, initialValue = 1)
	@Column(name = "f_id")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name="f_no",nullable=false,unique=true)
	@NotNull
	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}
	@Column(name="f_total")
	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}
	@Column(name="f_remain")
	public Double getRemain() {
		return remain;
	}

	public void setRemain(Double remain) {
		this.remain = remain;
	}

	
	

}
